package blogs.eidos.cloud.framework.log.controller;//package net.bigdata.cloud.framework.log.controller;
//
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import net.bigdata.cloud.framework.common.api.HttpCodeEnum;
//import net.bigdata.cloud.framework.common.api.Resp;
//import net.bigdata.cloud.framework.common.controller.BaseController;
//import net.bigdata.cloud.framework.common.dto.BasePageDto;
//import net.bigdata.cloud.framework.log.annotation.OperationLog;
//import net.bigdata.cloud.framework.log.entity.SysLoginLog;
//import net.bigdata.cloud.framework.log.enums.OperationLogType;
//import net.bigdata.cloud.framework.log.service.SysLoginLogService;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.validation.BindingResult;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import javax.validation.Valid;
//
///**
// * 系统登录日志 控制器
// *
// * @author Eidos
// * @since 2020-03-24
// */
//@Slf4j
//@RestController
//@RequestMapping("/sysLoginLog")
//@Api(value = "系统登录日志API", tags = {"系统登录日志"})
//public class SysLoginLogController extends BaseController {
//
//    @Resource
//    private SysLoginLogService sysLoginLogService;
//
//    /**
//     * 系统登录日志分页列表
//     */
//    @PostMapping("/page.do")
//    @RequiresPermissions("sys:login:log:page")
//    @OperationLog(name = "系统登录日志分页列表", type = OperationLogType.PAGE)
//    @ApiOperation(value = "系统登录日志分页列表")
//    public Resp<IPage<SysLoginLog>> getPage(@Valid @RequestBody BasePageDto dto, BindingResult result) {
//        try {
//            if (result.hasErrors()) {
//                return Resp.failed(result.getAllErrors().get(0).getDefaultMessage());
//            }
//            return sysLoginLogService.getPage(dto);
//        } catch (Exception e) {
//            log.error("服务调用异常：", e);
//            return Resp.failed(HttpCodeEnum.INVOKE_FAILURE_ERROR);
//        }
//    }
//
//}
//
